High performance system providing selective merging of dataframe segments in hardware

ABSTRACT

A method of writing data to a range of logical blocks in a storage medium includes: receiving a command including a starting logical block address, a value indicating a range of logical block addresses to be written, and a logical block of data; storing the logical block in a first temporary storage; generating a logical page by duplicating the logical block a plurality of times corresponding to a number of logical blocks in a logical page and transporting the generated logical page to a second temporary storage and storing the generated logical page in the second temporary storage; writing the generated logical page from the second temporary storage into the storage medium beginning from the starting logical block address; and performing a read-modify-write operation if the first write operation does not begin on a logical page boundary or the last write operation does not end on a logical page boundary.

BACKGROUND

1. Technical Field

This disclosure relates to data storage systems for computer systems. More particularly, the disclosure relates to writing selected data to a storage medium.

2. Related Art

Data storage systems provide storage for data of a host system. Data is grouped for storage in units of predetermined size referred to as logical blocks which are written to storage media. When writing the logical blocks of data to storage media, for example, in a solid state drive (SSD) or hybrid drive, data may be written in larger units, for example logical pages (L-pages), made up of a plurality of logical blocks. At times it becomes advantageous to write the same new data in a large number of logical blocks spanning several logical pages in the storage medium, or to write new different data to only some of the logical blocks included in a logical page in the storage medium.

BRIEF DESCRIPTION OF THE DRAWINGS

Aspects and features of the present inventive concept will be more apparent by describing example embodiments with reference to the accompanying drawings, in which:

FIG. 1 is a block diagram illustrating a data storage apparatus for writing the same new data in a large number of logical blocks according to an example embodiment of the present inventive concept;

FIG. 2 is a flowchart illustrating a method for implementing a write-same operation according to an example embodiment of the present inventive concept;

FIG. 3 is a block diagram illustrating a data storage apparatus for performing a skip-write operation according to an example embodiment of the present inventive concept;

FIG. 4 is a flowchart illustrating a method of implementing a skip-write operation according to an example embodiment of the present inventive concept;

FIG. 5A is a diagram illustrating a write mask according to an example embodiment of the present inventive concept;

FIG. 5B is a diagram illustrating a write mask divided into portions corresponding to a number of logical blocks contained in a logical page according to an example embodiment of the present inventive concept; and

FIG. 6 is a diagram illustrating a method of merging of a first logical page and a second logical page using a corresponding portion of a write mask according to an example embodiment of the present inventive concept.

DETAILED DESCRIPTION

While certain embodiments are described, these embodiments are presented by way of example only, and are not intended to limit the scope of protection. The methods and apparatuses described herein may be embodied in a variety of other forms. Furthermore, various omissions, substitutions, and changes in the form of the example methods and apparatuses described herein may be made without departing from the scope of protection.

Overview

Solid state drives (SSDs) are employed as data storage systems for computer systems. To modify data stored in a memory location of such a data storage system, data may be written in larger units, for example logical pages, made up of a plurality of logical blocks. For example, a 4 kilobyte (kB) logical page may consist of eight 512 byte logical blocks. At times it becomes advantageous to write identical data into a range of consecutive logical blocks or to modify data in non-consecutive logical blocks within a range of consecutive logical blocks.

System Overview

One aspect of the present inventive concept is directed to a Write Same apparatus and method which writes the same data into a sequential plurality of logical blocks. In one example embodiment of the Write Same apparatus, the apparatus receives a command including a starting logical block address (LBA), a range of LBA's (i.e., a value indicating the number of logical blocks into which data is to be written), and a block of data to be written into the logical blocks.

The Write Same apparatus operates to write the received block of data into each logical block in the specified range of LBA's beginning at the starting LBA. The Write Same apparatus performs a read-modify-write operation (RMW) if the first write operation does not begin on a logical page boundary or the last write operation does not end on a logical page boundary, merging logical page blocks on-the-fly and performing the appropriate bit-modifications.

Another aspect of the present inventive concept is directed to a Skip Write apparatus and method. In one example embodiment of the Skip Write apparatus, the apparatus receives a command including a starting logical block address, a value indicating a range of logical block addresses, and a write mask. Output logical pages are generated by merging logical blocks into logical pages based on corresponding portions of the write mask.

The Skip Write apparatus operates on the logical pages as determined by a write mask, applying hardware optimization to what were formerly software processes. The Skip Write apparatus merges logical page blocks on-the-fly and performs the appropriate bit-modifications based on the write mask.

Write Same

FIG. 1 is a block diagram illustrating a data storage apparatus for writing the same new data in a large number of logical blocks according to an example embodiment of the present inventive concept. Referring to FIG. 1, in one example embodiment of the present inventive concept a data storage apparatus 100 may include a command input device 110, a first temporary storage 120, a processor 130, a second temporary storage 140, cyclic redundancy check (CRC) generation circuitry 150, comparison circuitry 160, write circuitry 170, a counter 180, and a storage medium 190. Storage medium may include non-volatile memory such as solid-state semiconductor memory (e.g., NAND).

The elements of the data storage apparatus 100 may be integrated on one semiconductor chip or may be separate dies integrated into one semiconductor package. One of ordinary skill in the art will understand that other configurations are possible and are included within the scope of the present inventive concept. For example, the functionalities performed by the described elements may be performed by other elements, and the elements may be combined into fewer elements and/or sub-divided into a greater number of elements.

In one embodiment, the command input device 110 receives a command including a starting logical block address (LBA), a value indicating a range of LBAs, and a logical block of data to be written into the logical blocks within the range of LBAs. For example, the command may be received from a host that is connected to the data storage apparatus 100. The received logical block of data is transferred to the first temporary storage 120. The first temporary storage 120 may be internal or external to the processor 130. The processor 130 duplicates the received logical block of data to generate a logical page with each logical block having the same data as the received logical block of data. For example, for logical page containing eight logical blocks, the processor 130 duplicates the received logical block seven times to generate a logical page containing eight logical blocks each containing the same data.

Each logical block may include, for example but not limited to, about 512 bytes of data, about 1,024 bytes of data, about 2,048 bytes of data, or about 4,096 bytes of data. In some cases, for example when a storage medium is erased or reformatted, the received logical block of data may contain all ones or all zeros, and the value indicating the range of logical block addresses may indicate all of the logical block addresses of the storage medium.

The processor 130 causes the generated logical page to be transferred to the second temporary storage 140. The second temporary storage 140 may be a queue included in a (RMW) module 195. The processor 130 may cause the second temporary storage 140 to be reserved prior to transferring the generated logical page. As shown, the RMW module 195 may additionally include the CRC circuitry 150 and the write circuitry 170.

In one embodiment, the CRC circuitry 150 generates a CRC value based on at least the data and the LBA of each logical block and compares the CRC of the logical block data ready to be written with the CRC of the logical block data as received. If the CRCs do not match, the logical block data to be written is marked invalid. Although CRCs are mentioned in the example embodiments in this disclosure, the use of other error detection mechanisms for example, but not limited to, checksums and hash functions, etc., are possible in some embodiments.

In one embodiment, the write circuitry 170 outputs valid data to the storage medium 190. The counter 180 counts the number of logical blocks written to the storage medium 190 and generates a count value. The comparison circuitry 170 compares the count value to the value indicating a range of LBAs to be written. If the values match, the comparison circuitry 160 generates a signal indicating that the write same operation is complete. In some embodiments, the write same operation is subordinated to other (RMW) operations, so the write circuitry writes the logical page from the second temporary storage into the storage medium as a background task to other write operations involving merging.

In some cases, the first write operation does not begin on a logical page boundary and/or the last write operation does not end on a logical page boundary. In such cases, the (RMW) module 195 performs a RMW operation to modify only the logical blocks specified for the write mask for the corresponding logical page.

In the RMW operation, the generated logical page may be stored in the second temporary storage 140. A second logical page including a plurality of blocks is retrieved from the storage medium 190 by the RMW module 195. Sectors of the generated logical page and second logical page are merged via a plurality of data paths and multiplexers to generate a merged output logical page. In addition, a CRC for the merged output logical page is generated by calculating and accumulating on a block-by-block basis CRC data of the generated logical page and second logical page blocks merged to generate the merged output logical page.

The blocks of at least one of the generated logical page and second logical page are reconstructed into a check-data logical page as the merged output logical page is being generated. Alternatively, both of the generated logical page and second logical page may be reconstructed into check-data logical pages as the merged output logical page as being generated.

A CRC is calculated and accumulated on a block-by-block basis for the check-data logical page, and an error check is performed on the at least one check-data logical page comprising blocks corresponding to those of the generated logical page and second logical page to verify the corresponding blocks of the merged output logical page. Since at least some of the blocks in the check-data logical page are transmitted on a subset of the plurality of data paths that transmits blocks of the merged output logical page, the error check of the at least one check-data logical page verifies the blocks from the at least one check-data logical page in the merged output logical page. In one example embodiment, the error check of both check-data logical pages verifies the blocks of the first and second check-data logical pages in the merged output logical page.

In one embodiment, the RMW module is further configured to calculate a data integrity field for each block and insert the calculated data integrity field between the blocks. Protection schemes for preventing data integrity errors during data transfer are defined by the ANSI T10 Data Integrity Feature (T10 DIF) standard. T10 DIF provides a way to check the integrity of data read and written from a host bus adapter to the disk and back through the storage area network (SAN) fabric. This check is implemented through a data integrity field (DIF) defined in the T10 standard.

FIG. 2 is a flowchart illustrating a method for implementing a write-same operation according to an example embodiment of the present inventive concept. Referring to FIG. 2, a command comprising a starting logical block address, a value indicating a range of logical block addresses to be written, and a logical block of data is received (210). The logical block of data is transferred to a first temporary storage and stored (215). The first temporary storage may be memory internal to a processor or may be other memory integrated on the semiconductor chip. A logical page is generated by duplicating the logical block of data stored in the first temporary storage a number of times corresponding to the number of logical blocks contained in a logical page, for example eight logical blocks (220). The logical page thus generated is transported to a second temporary storage, for example, a queue (225).

A determination is made whether the first logical block address of the duplicated logical page begins at a logical page boundary of a current logical page or if the last logical block address of the duplicated logical page ends at a logical page boundary of a current logical page (230). If so (230-Y), a CRC is calculated as described above in the logical pages written to the storage medium (235). If the first logical block address of the duplicated logical page does not begin at a logical page boundary of a current logical page, or the last logical block address of the duplicated logical page does not correspond to a last logical block address of a current logical page (230-N), a RMW operation is performed to merge the corresponding logical blocks of the duplicated logical page into the current logical page (255).

After the logical page is written to the storage medium, the counter is updated with the number of blocks in the range of logical block addresses written (240). If the value in the counter does not equal the number of logical blocks in the range of logical block addresses to be written (245-N), the LBA is incremented by the number of logical blocks, in the range of logical block addresses, that are written in the current logical page (260), and the process repeats from operation 230. If all the blocks in the range of logical block addresses to be written have been written (245-Y) a write complete signal is generated (250) in the process ends.

Skip Write

FIG. 3 is a block diagram illustrating a data storage apparatus for performing a skip-write operation according to an example embodiment of the present inventive concept. Referring to FIG. 3, in one example embodiment of the present inventive concept a data storage apparatus 300 may include a command input device 310, a storage 320, input logic device 330, multiplexers 340, a first logic device 350, a second logic device 360, and a counter 370.

The elements of the data storage apparatus 300 may be integrated on one semiconductor chip or may be separate dies integrated into one semiconductor package. One of ordinary skill in the art will understand that other configurations are possible and are included within the scope of the present inventive concept. For example, the functionalities performed by the described elements may be performed by other elements, and the elements may be combined into fewer elements and/or sub-divided into a greater number of elements.

The command input device 310 receives a command including a starting logical block address (LBA), a value indicating a range of LBAs, and a write mask. The write mask specifies LBAs of logical blocks into which logical blocks containing different data will be merged. The new logical blocks associated with the command are received and stored in temporary storage 320. Each logical block may include, for example but not limited to, about 512 bytes of data, about 1,024 bytes of data, about 2,048 bytes of data, or about 4,096 bytes of data.

In one embodiment, the input logic device 330 divides the write mask into portions corresponding to a number of logical blocks comprising a logical page and constructs a first logical page based on a corresponding portion of the write mask. For example, for logical pages containing eight logical blocks, the write mask is divided into portions each containing eight bits as merge indicators associated with LBAs.

FIG. 5A is a diagram illustrating a write mask according to an example embodiment of the present inventive concept. Referring to FIG. 5A, the write mask contains 2,048 bits, each bit corresponding to an LBA beginning with the starting LBA received with the command. As an example, FIG. 5A illustrates a starting LBA of ‘8’ and an ending LBA of ‘2055’. Bits zero, two, and three of the write mask are set to ‘1’ indicating that new logical blocks will be inserted at the corresponding LBAs. The LBAs of the logical blocks to be merged may be consecutive or nonconsecutive.

FIG. 5B is a diagram illustrating a write mask divided into portions corresponding to a number of logical blocks contained in a logical page according to an example embodiment of the present inventive concept. As illustrated in FIG. 5B, for logical pages containing eight LBAs the write mask is divided into 256 portions each containing eight bits corresponding to the LBAs in a logical page. In the portion corresponding to the first logical page, logical blocks corresponding to LBAs 8, 10, and 11 will be replaced by inserting logical blocks associated with the received command into the logical page at those LBAs. One of ordinary skill in the art will appreciate that this example is merely to enhance understanding and is applicable to other configurations of logical pages, logical blocks, and LBAs.

In one embodiment, the input logic device 330 constructs the first logical page and retrieves a second logical page from a storage medium, for example storage medium 190 illustrated in FIG. 1, and verifies CRCs contained in the headers of each logical page. It must be noted that although CRCs are mentioned in the example embodiments in this disclosure, the use of other error detection mechanisms for example, but not limited to, checksums and hash functions, etc., are possible in some embodiments. Also, in some embodiments, the CRC verification may be performed elsewhere in the apparatus. The first and second logical pages are transferred block-by-block from the input logic device 330 in synchronization with the system clock to the data path circuitry 340 where the sectors of the first and second logical pages are merged at about the same speed as the system clock speed based on a corresponding portion of the write mask.

In one example embodiment, the first logical page is stored until a second logical page is retrieved. The second logical page is passed through the Skip Write apparatus 300 block-by-block at about the system clock speed and is merged with the stored first logical page. The first and second logical pages are processed by the first logic device 350 to determine whether the merged output logical page is valid.

FIG. 6 is a diagram illustrating merging of a first logical page and a second logical page using a corresponding portion of a write mask according to an example embodiment of the present inventive concept. In the example illustration of FIG. 6, the write mask indicates a logical block to merge into the output logical page with a “1” and a logical block to discard with a “0” with respect to the second logical page, and indicates a logical block to merge into the output logical page with a “0” and a logical block to discard with a “1” with respect to the first logical page. One of ordinary skill in the art will understand that the designations “1” and “0” are merely exemplary and that other designations are possible without departing from the scope of the inventive concept.

Referring to FIG. 6, a corresponding portion of a write mask 670 specifies logical blocks of the second logical page 640 which will be merged with logical blocks of the first logical page 610 in place of logical blocks of the first logical page 610 which will be discarded (shown as LBs to discard 620). Logical blocks of the second logical page 640 which are not specified to merge into the output logical page by the corresponding portion of the write mask 670 are discarded (shown as LBs to discard 650) while logical blocks of the second logical page 640 which are specified to merge into the output logical page by the corresponding portion of the write mask 670 (shown as LBs to keep 660) are merged with the first logical page 610 to generate a merged output logical page 680.

Conversely, logical blocks of the first logical page 610 which are not specified to merge into the output logical page by the corresponding portion of the write mask 670 are discarded (shown as LBs to discard 620) while logical blocks of the first logical page 610 which are specified to merge into the output logical page (shown as LBs to merge 630) by the corresponding portion of the write mask 670 are merged with the logical blocks to merge 660 of the second logical page 640 to generate the merged output logical page 680. In other words, logical blocks of the first logical page specified by the corresponding portion of the write mask are replaced by corresponding logical blocks of the second logical page in order to generate the merged output logical page and the unused sectors of the first and second logical pages are discarded.

While the above merge operations are described in terms of specified logical blocks of the second logical page which may be merged with logical blocks of the first logical page, one of ordinary skill in the art will appreciate that the scope of the present inventive concept also includes merging specified logical blocks of the first logical page with logical blocks of the second logical page. Also, while illustrated as such in FIG. 6, the number of logical blocks in the plurality of logical blocks of the first logical page and the second logical page may not be identical.

Referring again to FIG. 3, in one example embodiment the second logic device 360 calculates and accumulates a CRC for the merged output logical page. Each logical block of the merged output logical page is outputted from the Skip Write apparatus 300 on a block-by-block basis. Generation of the merged output logical page is performed at about the same speed as the system clock speed.

In one example embodiment, the first logic device 350 reconstructs the first and second logical pages as first and second check-data pages, respectively, and the CRCs of the check-data pages are calculated and accumulated by the first logic device 350 on a block-by-block basis. The first check-data page may include logical blocks that are transmitted on a first subset of data paths different from a subset of data paths that logical blocks of the first logical page merged into the output logical page are transmitted on, and the second check-data page may include logical blocks that are transmitted on a second subset of data paths different from the subset of data paths that logical blocks of the second logical page merged into the output logical page are transmitted on.

After processing the last logical block of the first and second logical pages, the CRC of the first logical page is transmitted to the first logic device 350. Simultaneously, the CRC of the second logical page is transmitted to the first logic device 350.

In one example embodiment, the first logic device 350 performs an error check by comparing the transmitted CRC of the first logical page to the CRC calculated for the first check-data page and compares the transmitted CRC of the second logical page to the CRC calculated for the second check-data page. If the received logical page CRCs matches the CRCs of the check-data pages, the merged output logical page will be valid since logical blocks of the merged output logical page passed through the same logic as the logical blocks of the check-data pages and no errors were introduced. If the CRCs do not match, a message is generated indicating that the merged output logical page is invalid. The validity can be verified this way because at least some of the logical blocks in the check-data page are transmitted on a subset of the plurality of data paths that also transmits logical blocks of the merged output logical page, so that the error check of the at least one check-data page verifies the merged output logical page. The use of output data from the actual merged logical page as part of the calculation of the check-data page CRC ensures that any error introduced along the path of the logical page merging mechanism is detected.

Concurrently with the generation of the merged output logical page, the second logic device 360 generates a CRC for the merged output logical page on a block-by-block basis. After the final logical block of the merged output logical page is outputted, the CRC generated by the second logic device 360 for the merged output logical page is outputted.

In a case where the values of a logical page portion of the write mask are all ones, the second logical page is outputted as the output logical page without being merged. Conversely, in a case where a logical page portion of the write mask values are all zeros, no logical page is outputted and the corresponding logical page data stored in the storage medium is not changed.

Referring again to FIG. 3, the counter 370 is incremented based on the number of logical blocks written to the storage medium. The value on the counter 370 is compared to the value of the LBA range received in the command and if the counter value matches the LBA range the counter 370 generates a signal indicating that the skip write process is complete.

FIG. 4 is a flowchart illustrating a method of implementing a skip-write operation according to an example embodiment of the present inventive concept. Referring to FIG. 4, a command including a starting logical block address (LBA), a value indicating a range of LBAs, and a write mask is received (410). New logical blocks associated with the command are received and stored in temporary storage (415). The write mask is divided into portions corresponding to a number of logical blocks comprising a logical page (425), and a portion of the write mask corresponding the current logical page is obtained (430).

If the values in the corresponding portion of the write mask are all the same (435-Y), either new data will be written in all of the LBAs in the logical page corresponding to that portion of the write mask, for example all bits in the corresponding portion of the write mask are set to ‘1’, or no new data needs to be written in the logical page, for example all bits in the corresponding portion of the write mask are set to ‘0’. In the case where new data will be written in all of the LBAs in the logical page (440-Y), a first logical page is constructed using the received logical blocks associated with the command (450). A CRC is calculated for the logical page thus constructed and the logical page is written to the storage medium (470). The counter is incremented based on the number of LBAs processed (475). The value on the counter is compared to the value of the LBA range received in the command (480), and if the counter value matches the LBA range (480-Y), the counter generates a signal indicating that the skip write process is complete (485). Otherwise, the process returns to operation 430.

In the case where no new data needs to be written in the logical page (440-N), no write operation to the storage medium takes place (445). The counter is incremented based on the number of LBAs processed (475). The value on the counter is compared to the value of the LBA range received in the command (480), and if the counter value matches the LBA range (480-Y), the counter generates a signal indicating that the skip write process is complete (485). Otherwise, the process returns to operation 430.

In the case where all the write mask values are not the same (435-N), a second logical page is retrieved (455), and a first logical page is constructed using the received logical blocks associated with the command based on a corresponding portion of the write mask (460). The first and second logical pages are merged with a RMW operation as described above (465). A CRC is calculated for the logical page thus constructed and the logical page is written to the storage medium (470). The counter is incremented based on the number of LBAs processed (475). The value on the counter is compared to the value of the LBA range received in the command (480), and if the counter value matches the LBA range (480-Y), the counter generates a signal indicating that the skip write process is complete (485). Otherwise, the process returns to operation 430.

Operations of the present inventive concept may be performed in the order described, in a different order, or operations may be combined. One of ordinary skill in the art will appreciate that the foregoing processes are exemplary and that other variations are possible without departing from the inventive concept.

While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the protection. The methods and apparatuses described herein may be embodied in a variety of other forms. Various omissions, substitutions, and/or changes in the form of the example methods and apparatuses described herein may be made without departing from the spirit of the protection.

The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the protection. For example, the example apparatuses and methods disclosed herein can be applied to solid-state drives, hard disk drives, hybrid hard drives, and the like. In addition, other forms of storage, for example, but not limited to, DRAM or SRAM, battery backed-up volatile DRAM or SRAM devices, EPROM, EEPROM memory, etc., may additionally or alternatively be used. As another example, the various components illustrated in the figures may be implemented as software and/or firmware on a processor, ASIC/FPGA, or dedicated hardware. Also, the features and attributes of the specific example embodiments disclosed above may be combined in different ways to form additional embodiments, all of which fall within the scope of the present disclosure.

Although the present disclosure provides certain example embodiments and applications, other embodiments that are apparent to those of ordinary skill in the art, including embodiments which do not provide all of the features and advantages set forth herein, are also within the scope of this disclosure. Accordingly, the scope of the present disclosure is intended to be defined only by reference to the appended claims. 

What is claimed is:
 1. A method of writing data to a range of logical blocks in a storage medium, the method comprising: receiving a command comprising a starting logical block address, a value indicating a range of logical block addresses to be written, and a logical block of data; storing the logical block of data in a first temporary storage; generating a logical page by duplicating the logical block of data a plurality of times corresponding to a number of logical blocks comprising a logical page and transporting the generated logical page to a second temporary storage and storing the generated logical page in the second temporary storage; writing the generated logical page from the second temporary storage into the storage medium beginning from the starting logical block address, wherein the writing the generated logical page is performed as a background task to other write operations involving merging; and performing a read-modify-write operation if the first write operation does not begin on a logical page boundary or the last write operation does not end on a logical page boundary.
 2. The method of claim 1, wherein the second temporary storage is a queue in a read-modify-write module.
 3. The method of claim 2, further comprising reserving the queue in a read-modify-write module prior to transporting and storing the generated logical page in the queue.
 4. The method of claim 1, further comprising: updating a count based on a number of logical blocks in the range of logical block addresses written to the storage medium in a current logical page and comparing the count to the value indicating the range of logical block addresses; and if the count matches the value indicating the range of logical block addresses, generating a signal indicating the writing is complete.
 5. The method of claim 1, wherein each logical page comprises a predetermined number of logical blocks.
 6. The method of claim 5, wherein each logical block comprises one of about 512 bytes of data, about 1024 bytes of data, about 2048 bytes of data, and about 4096 bytes of data.
 7. The method of claim 6, wherein the data bytes comprise all ones or all zeros.
 8. The method of claim 6, wherein the data bytes comprise predetermined data.
 9. The method of claim 6, wherein each logical block further comprises additional bytes of metadata.
 10. The method of claim 9, wherein the metadata for each logical block is updated with the logical block address into which the logical block is to be written.
 11. The method of claim 1, wherein the value indicating the range of logical block addresses is a value indicating all of the logical block address of the storage medium.
 12. The method of claim 1, wherein the generating a logical page is performed by a processor.
 13. An apparatus for writing data to a range of logical blocks, the apparatus comprising: a first device configured to receive a command comprising a starting logical block address, a value indicating a range of logical block addresses, and a logical block of data; a first temporary storage configured to store the logical block of data; a processor configured to generate a logical page by duplicating the logical block of data a plurality of times corresponding to a number of logical blocks comprising a logical page, and transport the generated logical page to a second temporary storage; a storage medium configured to store logical pages; write circuitry configured to write the generated logical page from the second temporary storage into the storage medium beginning from the starting logical block address, wherein the write circuitry writes the logical page from the second temporary storage into the storage medium as a background task to other write operations involving merging; and a read-modify-write module configured to perform a read-modify-write operation if the first write operation does not begin on a logical page boundary or the last write operation does not end on a logical page boundary.
 14. The apparatus of claim 13, wherein the second temporary storage is a queue in the read-modify-write module.
 15. The apparatus of claim 14, further comprising reserving the queue in the read-modify-write module prior to transporting and storing the generated logical page in the queue.
 16. The apparatus of claim 13, further comprising a counter configured to count a number of logical blocks in the range of logical block addresses written to the storage medium in a current logical page and compare the count to the value indicating the range of logical block addresses.
 17. The apparatus of claim 16, further comprising circuitry configured to generate an indication signal when the comparison indicates that the value indicating the range of logical block addresses is reached.
 18. The apparatus of claim 13, further comprising a read-modify-write module comprising circuitry configured to generate a cyclic redundancy code (CRC) for the generated logical page by accumulating CRC data of the logical blocks written into the output logical page on a block-by-block basis.
 19. The apparatus of claim 18, wherein the read-modify-write module is further configured to calculate a data integrity field for each block and insert the calculated data integrity field between the blocks. 